﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace MyWeb.Data
{
    public class VisitorInfo
    {
        #region[Declare variables]
        private string _MaTB;
        private string _ThoiGian;
        private string _SoTruyCap;
        #endregion
        #region[Public Properties]
        public string MaTB { get { return _MaTB; } set { _MaTB = value; } }
        public string ThoiGian { get { return _ThoiGian; } set { _ThoiGian = value; } }
        public string SoTruyCap { get { return _SoTruyCap; } set { _SoTruyCap = value; } }
        #endregion
        #region[Visitor IDataReader]
        public VisitorInfo VisitorIDataReader(IDataReader dr)
        {
            VisitorInfo obj= new VisitorInfo();
            obj.MaTB = (dr["MaTB"] is DBNull) ? string.Empty : dr["MaTB"].ToString();
            obj.ThoiGian = (dr["ThoiGian"] is DBNull) ? string.Empty : dr["ThoiGian"].ToString();
            obj.SoTruyCap = (dr["SoTruyCap"] is DBNull) ? string.Empty : dr["SoTruyCap"].ToString();
            return obj;
        }
        #endregion
    }
}